$def with(adminname = None, menulist = None)

<!doctype html>
<html>
<head>
<title>猫克斯管理中心 - 猫克斯</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta content="maocos.com" name="Copyright">
<link rel="stylesheet" type="text/css" href='/static/admin/css/manage.css'>
<script type="text/javascript" src="/static/scripts/libs/jquery.js"></script>
</head>
<body scroll="no">
<div class="header">
    <div class="logo2">猫克斯管理中心</div>
    <div class="nav">
        <ul>
            $for index, menu in enumerate(menulist)
                <li index="$index"><div><a href="$menu.lst[0].url" target="win" hidefocus>$menu.name</a></div></li>
        </ul>
    </div>
    <div class="logininfo">
            <span>欢迎, <em><!--{$adminname}--></em> [ <a href="$config.ADMIN_DIR/logout" target="_top">退出</a> ]</span>
            <span><a href="/" target="_blank">首页</a></span>
    </div>
</div>
<div class="main" id="main">
    <div class="mainA">
        <div id="leftmenu" class="menu">
            $for index, menu in enumerate(menulist):
                <ul index="$index" class="left_menu">
                    $for i, m in enumerate(menu.lst):
                        <li index="$i"><a href="$m.url" target="win">$m.name</a></li>
                </ul>
        </div>
    </div>
    <div class="mainB" id="mainB">
    <iframe src="$config.ADMIN_DIR/home" name="win" id="win" width="100%" height="100%" frameborder="0"></iframe>
    </div>
</div>
<script type="text/javascript">
window.onload =window.onresize= function(){winresize();}
function winresize()
{
function $$(s){return document.getElementById(s);}
var D=document.documentElement||document.body,h=D.clientHeight-90,w=D.clientWidth-160;
 $$("main").style.height=h+"px";
 $$("mainB").style.width=w+"px";
}
$$(document).ready(function(){
    var s=document.location.hash;
    if(s==undefined||s==""){s="#0_0";}
    s=s.slice(1);
    var navIndex=s.split("_");
    $$(".nav").find("li:eq("+navIndex[0]+")").addClass("active");
    var targetLink=$$(".menu").find("ul").hide().end()
                             .find(".left_menu:eq("+navIndex[0]+")").show()
                             .find("li:eq("+navIndex[1]+")").addClass("active")
                             .find("a").attr("href");
    $$("#win").attr("src",targetLink);
    $$(".nav").find("li").click(function(){
        $$(this).parent().find("li").removeClass("active").end().end()
               .addClass("active");
        var index=$$(this).attr("index");
        $$(".menu").find(".left_menu").hide();
        $$(".menu").find(".left_menu:eq("+index+")").show()
                  .find("li").removeClass("active").first().addClass("active");
        document.location.hash=index+"_0";
    });
    $$(".left_menu").find("li").click(function(){
            $$(this).parent().find("li").removeClass("active").end().end()
                            .addClass("active");
        document.location.hash=$$(this).parent().attr("index")+"_"+$$(this).attr("index");
    });
});
</script>
</body>
</html>
